package cn.cxy.demo

import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        button.setOnClickListener { printLog() }
    }

    private fun printLog() {
        Log.v("MainActivity", "打印一般信息")
        Log.d("MainActivity", "打印调试信息")
        Log.i("MainActivity", "打印提示信息")
        Log.w("MainActivity", "打印警告信息")
        Log.e("MainActivity", "打印错误信息")
    }
}